package com.example.demo.controller;

import com.example.demo.pojo.user;
import com.example.demo.service.User_serviceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/*
* 登录
* */

@Controller
public class login_controller {
    @Autowired
    User_serviceImpl service;
    @GetMapping("/")
    @ResponseBody
    public List<user> print(){
        List<user> all = service.findAll();
        System.out.println("返回成功");
        return all;
    }
}
